// 库存管理接口
import request from "@/common/request.js";
const api = {
  group: "/group/",
  groupTree: "/group/tree/",
};

const acGroupApi = {
  groupTree(params) {
    return request({
      url: api.groupTree,
      method: "get",
      params,
    });
  },
  get_group(params) {
    return request({
      url: api.group,
      method: "get",
      params,
    });
  },

  group_detail(id) {
    return request({
      url: api.group + id,
      method: "get",
    });
  },

  post_group(data) {
    return request({
      url: api.group,
      method: "post",
      data,
    });
  },

  patch_group(data, id) {
    return request({
      url: api.group + id + "/",
      method: "patch",
      data,
    });
  },

  delete_group(id) {
    return request({
      url: api.group + id + "/",
      method: "delete",
    });
  },
};
export default acGroupApi;
